<template>
	<view class="review-box page-box">
		<view style="height: 148rpx;">
			<u-navbar bgColor="#79C1FF" height="74">
				<view class="u-nav-slot-left flex-center" slot="left" @click="goBack">
					<image src="@/static/images/review/fanhui-nav.png"></image>
				</view>
				<view slot="center" class="u-nav-slot-center">
					单词收藏本
				</view>
			</u-navbar>
		</view>
		<view class="content">
			<view class="content-header flex-align-center">
				<view class="content-header-tab flex-align-center">
					<view class="content-header-tab-item flex-center" v-for="(item,index) in list"
						@click="tabChange(index)" :key="index" :class="current === index?'active':'' ">
						{{item.name}}
					</view>
				</view>
				<view class="time-select flex-align-center">
					<span class="time-label">时间范围：</span>
					<uni-datetime-picker v-model="range"   size="mini" type="daterange" @maskClick="maskClick" />
				</view>
				<view class="search-btn flex-center">
					查询
				</view>
			</view>

		</view>


	</view>
</template>

<script>
	export default {
		components: {

		},
		data() {
			return {
				range: [],
				list: [{
					name: '认词'
				}, {
					name: '听写'
				}, {
					name: '默写',
				}],
				current: 0
			};
		},
		methods: {
			goBack() {
				this.$common.goBack()
			},
			tabChange(val) {
				console.log(val);
				this.current = val;
			},
			maskClick(e) {
				console.log('maskClick事件:', e);
			}
		}
	}
</script>

<style lang="scss">
	@function px_2_vw($px) {
		@return #{$px * 100 / 1920}vw;
	}

	.page-box {}

	.u-nav-slot-left {
		width: px_2_vw(80);
		height: px_2_vw(80);
		background: linear-gradient(0deg, #0BBAFB 0%, #4285EC 100%);
		border-radius: 50%;

		image {
			width: px_2_vw(35);
			height: px_2_vw(43);
		}
	}

	.u-nav-slot-center {
		color: #2A61FC;
		font-size: px_2_vw(48);
	}

	.u-nav-slot-right {}

	.content {
		padding: 42rpx 54rpx;
	}

	.content-header {
		padding-bottom: 43rpx;
		border-bottom: 1rpx dashed #A9A9A9;
		.content-header-tab-item {
			width: px_2_vw(97);
			height: px_2_vw(47);
			background-color: #fff;
			color: #000;
			font-size: px_2_vw(25);
			border-radius: 10rpx;
			border: 1rpx solid #4D4D4D;
			margin-right: 22rpx;
		}

		.time-select {
			width: px_2_vw(600);
			height: px_2_vw(42) !important;
			line-height: px_2_vw(42) !important;
			 
			.time-label {
				color: #868686;
				font-size: px_2_vw(25);
			}

		}
		.search-btn {
	width: px_2_vw(97);
	height: px_2_vw(47);
			font-size: px_2_vw(21);
			color: #fff;
			background-color: #FF9702;
			margin-left: px_2_vw(30);
			border-radius: 15rpx;
		}
	}

	.active {
		background-color: #2A61FC !important;
		color: #fff !important;
		border: 1rpx solid #2A61FC !important;
	}

	/deep/ .uni-date__x-input {
		height: px_2_vw(42) !important;
		line-height: px_2_vw(42) !important;
		padding: 0 !important;
	}
	/deep/ .uni-date-x {
		height: px_2_vw(47) !important;
		line-height: px_2_vw(47) !important;
		padding: 0 !important;
	}
</style>